<!DOCTYPE html>
<html>
	<head>
		<title>Home</title>
		<!--bootstarp-css-->
		<link href="../css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
		<!--/bootstarp-css -->
		<!--css-->
		<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
		<link href="../css/hover.css" rel="stylesheet" media="all">
		<!--领养-->
		<style>
			#search-top {
				z-index: 9999;
				background: #fff;
				padding: 10px;
			}

			#search-top .input-group-addon {
				border-radius: 0;
			}

			#loadLocation {
				border-right: none;
				color: #ff6735;
			}

			.panel-body {
				padding: 0 10px;
			}

			.panel-body .radio {
				padding-left: 30px;
			}

			label {
				font-weight: normal;
			}

			.page-container {
				width: 970px;
				margin: 10px auto;
			}

			.search-city {
				padding-right: 5px;
			}

			#addPost {
				margin-top: 80px;
			}

			#lingyang-list2 {
				margin: 10px 0;
			}

			#lingyang-list2 li {
				background: #fff;
				padding: 10px;
				position: relative;
				/* border-bottom: 2px #ccc solid; */
				box-shadow: 0 10px 6px -6px rgb(219, 219, 219);
				/* border-top: 2px #ccc solid; */
			}

			#lingyang-list2 a:hover {
				text-decoration: none;
			}

			#lingyang-list2 .media-heading {
				height: 30px;
				line-height: 30px;
				font-size: 16px;
				;
				overflow: hidden;
				margin-bottom: 10px;
			}

			#lingyang-list2 .address {
				color: #999;
			}

			#lingyangList_page .fabu-btn {
				margin-bottom: 10px;
			}

			#lingyangList_page .panel {
				margin-bottom: 10px;
			}

			.ly-cell-con .media-heading .btn {
				position: absolute;
				left: 5px;
			}

			.ly-cell-con .figure .btn {
				position: absolute;
			}

			.xs-button {
				margin: 10px 10px 0;
				width: auto;
			}

			/* 筛选标签卡 */
			.mobile-nav .filter {
				/* font 16 */
				background: #f4f4f4;
				width: 100%;
				z-index: 1;
			}

			.mobile-nav .filter li {
				/* font 14 */
				float: left;
				width: 25%;
				text-align: center;
				font-size: 0.875em;
				height: 39px;
				line-height: 39px;
				padding-bottom: 1px;
				border-right: 1px solid #e4e4e4;
				border-bottom: 1px solid #e4e4e4;
			}

			.mobile-nav .filter li:last-child {
				border-right: none;
			}

			.mobile-nav .filter li a {
				font-size: 14px;
				color: #333;
				display: block;
			}

			.mobile-nav ul {
				margin-bottom: 0;
			}

			.mobile-nav li.filter_active {
				padding-bottom: 0;
				border-bottom-width: 2px;
				border-bottom-color: #ff9900;
			}

			.mobile-nav .f_condition a {
				display: block;
				text-indent: -10%;
				height: 39px;
				line-height: 39px;
				padding-bottom: 1px;

				background: url() no-repeat 74% 50%;
				background-size: 6px 9px;
			}

			.mobile-nav .f_condition_act a {
				background-image: url();
			}

			.mobile-nav .param-check-box {
				padding: 10px;
				background: #fff;
			}

			.param-check-box {
				position: relative;
				border-bottom: 1px solid #f1f2f4;
				padding-left: 5px;
			}

			.param-check-box ul {
				padding-top: 10px;
				padding-bottom: 0;
				margin-bottom: 0;
			}

			.param-check-box ul>li {
				line-height: 35px;
				margin-bottom: 10px;
			}

			.param-check-box ul>li input[type="radio"] {
				display: none;
			}

			.param-check-box ul>li .active {
				background: #f1f2f4;
			}

			.param-check-box ul>li .radio-inline {
				border: 1px solid #ccc;
				padding: 0 10px;
			}

			.param-check-box .btn {
				text-shadow: none;
				line-height: 35px;
				padding: 0 12px;
				margin-right: 10px;
				background: #fff;
				box-shadow: none;
				border: 1px solid #ccc
			}

			.param-check-box .btn.active {
				background: #f1f2f4;
			}

			#pack_up {
				bottom: 10px;
				position: absolute;
				right: 10px;
			}

			@media screen and (max-width: 768px) {
				#lingyangList_page {
					padding: 0;
				}

				#lingyang-list2 {
					margin: 0;
				}

				.search-city {
					padding-right: 0;
				}

				#search-top {
					background: #f1f2f4;
					padding: 0 10px;
				}

				.w-box {
					background-color: #fff;
					margin: 10px auto;
					padding: 10px;
					width: 100%;
				}
			}

			.showuser span {
				font-size: 14px;
				color: #999;
				margin: 0 1px;
			}

			.plan-deta {
				/* border: 1px #ccc solid; */
				margin-top: 10px;
				/* box-shadow: 0 10px 6px -6px rgb(219, 219, 219); */
				padding: 5px;
			}

			.plan3 p>span {
				margin: 0 10px;
			}
		</style>
		<!--/css-->
		<style>
			.page-container a,
			.page-container a:hover {
				color: #0c8687;
				font-size: 14px;
				text-decoration: none;
			}

			.pagination>.active>a,
			.pagination>.active>span,
			.pagination>.active>a:hover,
			.pagination>.active>span:hover,
			.pagination>.active>a:focus,
			.pagination>.active>span:focus {
				z-index: 3;
				color: #fff;
				cursor: default;
				background-color: #0c8687;
				border-color: #0c8687;
			}

			.pagination>li>a {
				color: rgb(187, 187, 187);
			}
		</style>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="Petcare Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
Smartphone Compatible web template, free web designs for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
		<script type="application/x-javascript">
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		</script>
		<script src="../js/jquery.min.js"></script>
		<script src="../js/modernizr.custom.js"></script>
		<script src="../js/responsiveslides.min.js"></script>
		<script>
			// You can also use "$(window).load(function() {"
			$(function() {
				$("#slider2").responsiveSlides({
					auto: true,
					pager: true,
					speed: 300,
					namespace: "callbacks",
				});
			});
		</script>
	</head>
	<body>
		<!--header-->
		<div class="header">
			<div class="header-info">
				<div class="container">
					<div class="logo">
						<a href="index.html"><img src="../images/logo-pet.png" style="position: absolute;width: 330px;height: 262px;top: -60px;left: 280px;"/></a>
					</div>
					<div class="search-box">
						<form>
							<input type="text" name="s" class="textbox" placeholder="Search" required="">
							<input type="submit" value="">
						</form>
					</div>
					<div class="clearfix"> </div>
				</div>
			</div>
		</div>
		<div class="container">
			<div class="header-bottom">
				<div class="menu">
					<span class="menu-info"> </span>
					<ul class="cl-effect-21">
						<li id="oneser"><a id="service" href="index.html" class="active">服务中心</a>
							<div id="yican">
								<div>
									<p><a href="adopt.html">宠物领养</a></p>
									<p><a href="farmed.html">宠物寄养</a></p>
									<p><a href="notice.html">寻宠|招领</a></p>
								</div>
							</div>
						</li>
						<li><a href="petbaike.html">宠物百科</a></li>
						<li><a href="news.html">宠物新闻</a></li>
						<li><a href="bbs.html">宠物论坛</a></li>
						<li><a>关于我们</a></li>
						<li id="twoser">
							<a id="myme">个人中心</a>
							<div id="yincan">
								<div>
									<p><a href="myinfo.html">我的</a></p>
									<p><a id="overpet">注销</a></p>
								</div>
							</div>
						</li>
					</ul>
				</div>
				<style>
					#yincan {
						width: 160px;
						height: 110px;
						position: absolute;
						top: 70px;
						right: 46px;
						background-color: #fff;
						display: none;
					}
				</style>
				<!--yican -->
				<script>
					$("#service").mouseenter(function() {
						$("#yican").css("display", "block");
					});
					$("#oneser").mouseleave(function() {
						$("#yican").css("display", "none");
					});
					$("#myme").mouseenter(function() {
						$("#yincan").css("display", "block");
					});
					$("#twoser").mouseleave(function() {
						$("#yincan").css("display", "none");
					});
					//注销
					$("#overpet").click(function(){
						if(!confirm('是否确定注销该用户并退出登录？'))
						return;
						$.post('http://localhost:80/ct/remove',function(res){
							if(res){
								location.href='login.html';
							}
						});
					})
				</script>
				<!-- /yican -->
				<!--script-nav -->
				<script>
					$("span.menu-info").click(function() {
						$("ul.cl-effect-21").slideToggle("slow", function() {});
					});
				</script>
				<!-- /script-nav -->
				<div class="clearfix"> </div>
			</div>
		</div>
		<div class="page-container" style="position: relative;">
			<span class="label label-warning hidden-xs" style="position: absolute;top: 50px;left: 10px;">帖子详情</span>
			<div class="row" id="lingyangList_page shop_list_page">
				<div class="col-md-9" style="margin-top: 10px;">
					<div class="pin-wrapper" style="height: 60px;">
					</div>
					<!-- 帖子详情 -->
					<div class="plan-deta">
						<div style="margin-bottom: 10px;">
							<h2 class="ftitle">我是BBS给你脸给多了</h2>
						</div>
						<div style='margin-bottom: 10px;' class='showuser'>
							<span>
								<img src='../images/8.jpg' class="userimg"
									style='width: 40px;height: 40px;border-radius: 50%;' />
								<span style='margin-left:5px' class="username">zs</span>
							</span>
							<span> | </span>
							<span><span class="fbdate">2023-11-11 12:23:45</span></span>
							<span> | </span>
							<span>来自:<span class="useraddress">湖南省长沙市开福区</span></span>
						</div>
						<div style="margin-bottom: 20px;">
							<p class="fdetail">我狗子长得太好看了吧，啊，圆嘟嘟的小可爱，谁会不爱啊我狗子长得太好看了吧，啊我狗子长得太好看了吧，啊，圆嘟嘟的小可爱，谁会不爱啊</p>
							<p style="text-align: center;" class="imgshow"></p>
						</div>
						<div style="border-top: 1px #ccc solid;" class="plan3">
							<p style="font-size: 12px;color: #cdcdcd;line-height:40px;height: 40px;">
								<span><a><img src="../images/read.png" width="20px" /></a><span
										id="readnum">234</span></span>&nbsp;&nbsp;&nbsp;
								<span id="pl">
									<a id="review" title="评论"><img src="../images/review1.png" width="16px" /></a>
									评论</span>&nbsp;&nbsp;&nbsp;
								<span class="like">
									<a id="like" title="点赞" href="javascript:void(0)"><img class="likeimg"
											src="../images/ax3.png" width="20px" /></a>
									<span class="likespan">点赞</span></span>&nbsp;&nbsp;&nbsp;
								<span class="coll">
									<a id="coll" title="收藏"><img class="collimg" src="../images/coll1.png"
											width="20px" /></a>
									<span class="collspan">收藏</span></span>&nbsp;&nbsp;&nbsp;
							</p>
						</div>

					</div>
					<!-- 评论 -->
					<div class="plan-deta">
						<div>
							<h4><span id="reviewnum">2</span>条评论</h4>
						</div>
						<!-- 进行评论 -->
						<div class="addreview" style="margin: 10px 0;display: none;">
							<form method="post" enctype="multipart/form-data">
								<textarea class="form-control redetail" cols="24" rows="5"></textarea>
								<input class="form-control" type="file" id="file-review"
									style="width: 210px;outline: none;border: none;display: inline-block;" />
								<input type="hidden" id="uid" value="" />
								<button class="btn btn-success" id="addreview"
									style="outline: none;width: 80px;height: 40px;text-align: center;line-height: 20px;float: right;margin-top: 5px;">评论</button>
							</form>
						</div>
						<!-- 显示评论 -->
						<div>
							<ul style="list-style: none;display:inline;" class="reviewinfo">
								<li style="margin-bottom: 10px;">
									<div style='margin-bottom: 10px;' class='showuser'>
										<span>
											<img src='../images/8.jpg'
												style='width: 40px;height: 40px;border-radius: 50%;' />
											<span style='margin-left:5px'>zs</span>
										</span>
										<span> | </span>
										<span><span>2023-11-11 12:23:45</span></span>
									</div>
									<div>
										<p>我是你爸爸我真伟大哈哈哈哈哈哈哈哈哈哈哈哈</p>
										<p style="text-align: center;"><img src="../images/bm.gif"
												style="display: inline-block;"></p>
									</div>
								</li>
							</ul>
						</div>
						<!-- 分页 -->
						<div style="text-align: center;;width: 30%;height: 40px;margin: 0 auto;line-height: 40px;"
							class="pageshow">
							<span style="margin: 0 10px;float: left;"><a id="prevpage">&lt;上一页</a></span>
							<span><input class="form-control pages" value="1"
									style="width: 38px;height: 38px;display: inline-block;text-align: center;" /></span>
							<span style="margin: 0 10px;float: right;"><a id="nextpage">下一页&gt;</a></span>
						</div>
					</div>
				</div>
				<style>
					.ul-news,
					.ul-like,
					.ul-coll,
					.ul-review {
						list-style: none;
						font-size: 14px;
						width: 230px;
					}

					.ul-news tr,
					.ul-like tr,
					.ul-coll tr,
					.ul-review tr {
						margin: 5px 0;
					}

					.ul-news th,
					.ul-like th,
					.ul-coll th,
					.ul-review th {
						color: #999;
					}

					.ul-news tr td,
					.ul-like tr td,
					.ul-coll tr td,
					.ul-review tr td {
						color: #ccc;
					}

					.ul-news a,
					.ul-like a,
					.ul-coll a,
					.ul-review a {
						color: #ccc;
					}
				</style>

				<div class="col-md-3 col-xs-12 hidden-xs hidden-sm">
					<div class="pin-wrapper" style="height:auto;">
						<h4
							style="margin-top: 60px;color: #0c8687;width: 100%;height: 27px;border-bottom: 2px #ddd solid;">
							最多浏览</h4>
						<table class="ul-news">
							<tr align="center">
								<th style="text-align: center;">排名</th>
								<th style="text-align: center;">标题</th>
							</tr>
						</table>
					</div>
					<div class="pin-wrapper" style="height:auto;">
						<h4
							style="margin-top: 60px;color: #0c8687;width: 100%;height: 27px;border-bottom: 2px #ddd solid;">
							最多点赞</h4>
						<table class="ul-like">
							<tr align="center">
								<th style="text-align: center;">排名</th>
								<th style="text-align: center;">标题</th>								
							</tr>		
						</table>
					</div>
					<div class="pin-wrapper" style="height:auto;">
						<h4
							style="margin-top: 60px;color: #0c8687;width: 100%;height: 27px;border-bottom: 2px #ddd solid;">
							最多收藏</h4>
						<table class="ul-coll">
							<tr align="center">
								<th style="text-align: center;">标题</th>
								<th style="text-align: center;">收藏量</th>
							</tr>

						</table>
					</div>
				<!-- 	<div class="pin-wrapper" style="height: 230px;">
						<h4
							style="margin-top: 60px;color: #0c8687;width: 100%;height: 27px;border-bottom: 2px #ddd solid;">
							最多评论</h4>
						<table class="ul-review">
							<tr align="center">
								<th style="text-align: center;">标题</th>
								<th style="text-align: center;">评论量</th>
							</tr>
						</table>
					</div> -->

				</div>
			</div>
		</div>

		<!--/header-->
		<!--footer-->
		<div class="footer">
			<div class="container">
				<div class="copy-rights">
					<p>Copyright &copy; 2023.Company <a target="_blank" href="index.html">you宠</a></p>
				</div>
			</div>
		</div>
		<!--/footer-->
		<script type="text/javascript">
			$(function() {
				let index = 1;
				let pages = 1;
				//自定义promise方法
				function getPromise(url, data) {
					return new Promise(function(resolve, reject) {
						$.post(url, data, function(res) {
							resolve(res);
						}, "json").fail(function(err) {
							reject(err);
						})
					});
				}

				let temp = new URLSearchParams(location.search);
				let forumid = temp.get("forumid"); //领养编号	

				// 增加浏览量
				upreadnum();
				function upreadnum() {
					getPromise('http://localhost:80/ct/addreadnum', {
						"forumid": forumid
					});
				}

				//显示帖子详情
				forumshow();
				function forumshow() {
					getPromise('http://localhost:80/ct/bbsdetail', {
						"forumid": forumid
					}).then(function(r) {
						$(".ftitle").text(r.forumtitle);
						$(".fdetail").text(r.forumdetail);
						$(".fbdate").text(r.fbdate);
						$("#readnum").text(r.readnum);
						$("#uid").val(r.fb_uid);
						if (r.fb_file != null || r.fb_file != null != "") {
							$(".imgshow").append("<img src='../images/" + r.fb_file +
								"' style='display: inline-block;'/>");
						}
						let uid = r.fb_uid;
						return getPromise('http://localhost:80/ct/userdetail', {
							"uid": uid
						});
					}).then(function(r) {
						$(".username").text(r.username);
						$(".useraddress").text(r.faddress);
						$(".userimg").attr("src", "../images/" + r.filename + "");
						return getPromise('http://localhost:80/ct/yzlike', {
							"forumid": forumid
						});
					}).then(function(r) {
						if (r) {

							$(".likeimg").attr("src", "../images/ax2.png");
							$(".likespan").text("已点赞").css("color", "red");
						} else {
							$(".likeimg").attr("src", "../images/ax3.png");
							$(".likespan").text("点赞").css("color", "#ccc");
						}
						return getPromise('http://localhost:80/ct/yzcoll', {
							"forumid": forumid
						});
					}).then(function(r) {
						if (r) {

							$(".collimg").attr("src", "../images/coll2.png");
							$(".collspan").text("已收藏").css("color", "red");
						} else {
							$(".collimg").attr("src", "../images/coll1.png");
							$(".collspan").text("收藏").css("color", "#ccc");
						}
					});
				}

				$("#prevpage").click(function() {
					if (index > 1) {
						index = index - 1;
					} else {
						alert("当前已是评论最首页！");
						index = 1;
					}
					$(".pages").val(index);
					reviewshow();

				});
				$("#nextpage").click(function() {
					if (index < pages) {
						index = index + 1;
					} else {
						alert("当前已是评论最末页！");
						index = pages;
					}
					$(".pages").val(index);
					reviewshow();
				});
				$(".pages").blur(function() {
					let pagenum = $(this).val();
					if (pagenum <= 0) {
						alert("输入页码不能小于1！");
						index = index;
					} else if (pagenum > pages) {
						alert("输入页码不能超过最大页码！");
						index = index;
					} else {
						index = pagenum;

					}
					$(this).val(index);
					reviewshow();

				})

				//显示帖子评论
				reviewshow();
				function reviewshow() {
					$.post('http://localhost:80/ct/reviewshow', {
						"forumid": forumid,
						"index": index
					}, function(r) {
						$(".reviewinfo").children().remove();
						$(r.records).each(function(i, e) {
							let uid = e.re_uid; //评论的用户
							let username = "";
							let address = "";
							let files = "";
							$.post('http://localhost:80/ct/userdetail', {
								"uid": uid
							}, function(r) {
								username = r.username;
								files = r.filename;
								if (e.re_file == null || e.re_file == "") {
									let lis = "<li style='margin-bottom: 10px;'>" +
										"<div style='margin-bottom: 10px;' class='showuser'>" +
										"<span>" +
										"<img src='../images/" + files +
										"' style='width: 40px;height: 40px;border-radius: 50%;'/>" +
										"<span style='margin-left:5px'>" + username + "</span>" +
										" </span>" +
										"<span> | </span>" +
										" <span><span>" + e.redate + "</span></span>" +
										"</div>" +
										"<div>" +
										"<p>" + e.reviewdetail + "</p>" +
										"<p style='text-align: center;'></p>" +
										"</div>" +
										"</li>";
									$(".reviewinfo").append(lis);
								} else {
									let lis = "<li style='margin-bottom: 10px;'>" +
										"<div style='margin-bottom: 10px;' class='showuser'>" +
										"<span>" +
										"<img src='../images/" + files +
										"' style='width: 40px;height: 40px;border-radius: 50%;'/>" +
										"<span style='margin-left:5px'>" + username + "</span>" +
										" </span>" +
										"<span> | </span>" +
										" <span><span>" + e.redate + "</span></span>" +
										"</div>" +
										"<div>" +
										"<p>" + e.reviewdetail + "</p>" +
										"<p style='text-align: center;'><img src='../images/" + e
										.re_file + "' style='display: inline-block;'></p>" +
										"</div>" +
										"</li>";
									$(".reviewinfo").append(lis);
								}

							}, "json");
						});
						pages = r.pages;
						if (r.total == 0) {
							$(".addreview").css("display", "block");
						}
						if (r.total < r.size) {
							$(".pageshow").css('display', "none");
						}
						$("#reviewnum").text(r.total);
					}, "json");
				}
				
				//点击评论
				$("#addreview").click(function(event) {
					event.preventDefault(); //阻止表单提交
					let uid = $("#uid").val();
					let userid = "";
					$.post('http://localhost:80/ct/userdetail', {
						"uid": 0
					}, function(r) {
						userid = r.uid;
						//相同用户不能评论
						if (uid == userid) {
							alert("不能评论自己的帖子！");
							$(".redetail").val("");
							return;
						} else {
							var formData = new FormData();
							if ($(".redetail").val() == '' || uid == '') {
								alert("添加信息不能为空！");
								return;
							}
							formData.append("detail", $(".redetail").val());
							formData.append("forumid", forumid);
							formData.append("uid", uid);
							let f = document.getElementById('file-review');
							let f1 = f.files[0];
							// 判断是否选择上传图片
							if ($("#file-review").val() == '') {
								//不上传	
								$.post('http://localhost:80/ct/addreview1', {
									"detail": $(".redetail").val(),
									"forumid": forumid,
									"uid": uid
								}, function(r) {
									if (r) {
										alert("添加成功！");
									} else {
										alert("添加失败！");
									}
									location.href = 'bbsdetail.html?forumid=' + forumid;
								});
							} else {
								formData.append("files", f1);
								$.ajax({
									url: 'http://localhost:80/ct/addreview2',
									type: 'post',
									data: formData,
									contentType: false,
									processData: false,
									success: function(res) {
										console.log(res);
										if (res) {
											alert("添加成功！");
										} else {
											alert("添加失败！");
										}
										location.href = 'bbsdetail.html?forumid=' + forumid;
									}
								})
							}

						}
					});

				})

				//点击点赞
				$(".like").click(function() {
					$.post('http://localhost:80/ct/yzlike', {
						"forumid": forumid
					}, function(r) {
						if (r) {
							$.post('http://localhost:80/ct/dellike', {
								"forumid": forumid
							}, function(r) {
								if (r) {
									//取消点赞							
									$(".likeimg").attr("src", "../images/ax3.png");
									$(".likespan").text("点赞").css("color", "#ccc");
								}
							}, "json");
						} else {
							$.post('http://localhost:80/ct/addlike', {
								"uid": $("#uid").val(),
								"forumid": forumid
							}, function(r) {
								if (r) {
									$(".likeimg").attr("src", "../images/ax2.png");
									$(".likespan").text("已点赞").css("color", "red");
								}
							}, "json");
						}
					}, "json");

				})

				//点击收藏
				$(".coll").click(function() {
					$.post('http://localhost:80/ct/yzcoll', {
						"forumid": forumid
					}, function(r) {
						if (r) {
							$.post('http://localhost:80/ct/delcoll', {
								"forumid": forumid
							}, function(r) {
								if (r) {
									//取消点赞							
									$(".collimg").attr("src", "../images/coll1.png");
									$(".collspan").text("收藏").css("color", "#ccc");
								}
							}, "json");
						} else {
							$.post('http://localhost:80/ct/addcoll', {
								"uid": $("#uid").val(),
								"forumid": forumid
							}, function(r) {
								if (r) {
									$(".collimg").attr("src", "../images/coll2.png");
									$(".collspan").text("已收藏").css("color", "red");
								}
							}, "json");
						}
					}, "json");
				})
 
                //浏览最多
                maxreadnum();
                function maxreadnum() {
                	getPromise('http://localhost:80/ct/readnumshow', {
                		"hh": 435
                	}).then(function(r) {
                		$(".ul-news").children().first().siblings().remove();
                		$(r.records).each(function(i, e) {
                			let t = e.forumtitle;
                			if (t.length > 10) {
                				t = t.slice(0, 10) + "...";
                			}
                			let trs =
                				"<tr align='center'><td>" +(i+1)+ "</td><td><a href='bbsdetail.html?forumid=" +e.forumid+ "' onmouseenter='r1($(this))' onmouseleave='r2($(this))'>" +
                				t + "</a></td></tr>";
                			$(".ul-news").append(trs);
                		})
                	})
                }
                
				//喜欢最多
				maxlikenum();
				function maxlikenum(){
					getPromise('http://localhost:80/ct/likenumshow', {
						"hh": 435
					}).then(function(r) {
						$(".ul-like").children().first().siblings().remove();
						$(r.records).each(function(i, e) {
							let fid = e.like_forumid;						
							$.post('http://localhost:80/ct/bbsdetail', {"forumid": fid},function(r){
								let t = r.forumtitle;
								if (t.length > 10) {
									t = t.slice(0, 10) + "...";
								}
								let trs =
									"<tr align='center'><td>" +(i+1)+ "</td><td><a href='bbsdetail.html?forumid=" +r.forumid+ "' onmouseenter='r1($(this))' onmouseleave='r2($(this))'>" +
									t + "</a></td></tr>";
								$(".ul-like").append(trs);
							},"json");							
						})
					})
				}
				
				
				//收藏最多
				maxcollnum();
				function maxcollnum(){
					getPromise('http://localhost:80/ct/collnumshow', {
						"hh": 435
					}).then(function(r) {
						$(".ul-coll").children().first().siblings().remove();
						$(r.records).each(function(i, e) {
							let fid = e.co_forumid;							
							$.post('http://localhost:80/ct/bbsdetail', {"forumid": fid},function(r){
								let t = r.forumtitle;
								if (t.length > 10) {
									t = t.slice(0, 10) + "...";
								}
								let trs =
									"<tr align='center'><td>" +(i+1)+ "</td><td><a href='bbsdetail.html?forumid=" +r.forumid+ "' onmouseenter='r1($(this))' onmouseleave='r2($(this))'>" +
									t + "</a></td></tr>";
								$(".ul-coll").append(trs);
							},"json");							
						})
					})
				}
				
				// //评论最多
				// maxreviewnum();
				// function maxreviewnum(){
				// 	getPromise('http://localhost:80/ct/reviewnumshow', {
				// 		"hh": 435
				// 	}).then(function(r) {
				// 		$(".ul-review").children().first().siblings().remove();
				// 		$(r.records).each(function(i, e) {
				// 			let fid = e.r_forumid;							
				// 			$.post('http://localhost:80/ct/bbsdetail', {"forumid": fid},function(r){
				// 				let t = r.forumtitle;
				// 				if (t.length > 10) {
				// 					t = t.slice(0, 10) + "...";
				// 				}
				// 				let trs =
				// 					"<tr align='center'><td>" +(i+1)+ "</td><td><a href='bbsdetail.html?forumid=" +r.forumid+ "' onmouseenter='r1($(this))' onmouseleave='r2($(this))'>" +
				// 					t + "</a></td></tr>";
				// 				$(".ul-review").append(trs);
				// 			},"json");							
				// 		})
				// 	})
				// }
				
				
			})

			function r1(that) {
				that.css("color", "red");
			}

			function r2(that) {
				that.css("color", "#ccc");
			}
		</script>
		<!-- 鼠标移入移出显示 -->
		<script type="text/javascript">
			$("#pl").click(function() {
				$(".addreview").css("display", "block");
			})
			$("#review").mouseenter(function() {
				$(this).children().attr("src", "../images/review2.png");
				$(this).parents("span").css("color", "#dbdbdb");
			});
			$("#review").mouseleave(function() {
				$(this).children().attr("src", "../images/review1.png");
				$(this).parents("span").css("color", "#cdcdcd");
			});
		</script>

	</body>
</html>